import request from '@/utils/request'

// 查询学生部门列表
export function listStudept(query) {
  return request({
    url: '/studept/studept/list',
    method: 'get',
    params: query
  })
}

// 查询部门列表（排除节点）
export function listStudeptExcludeChild(deptId) {
  return request({
    url: '/studept/studept/list/exclude/' + deptId,
    method: 'get'
  })
}

// 查询学生部门详细
export function getStudept(deptId) {
  return request({
    url: '/studept/studept/' + deptId,
    method: 'get'
  })
}

// 新增学生部门
export function addStudept(data) {
  return request({
    url: '/studept/studept',
    method: 'post',
    data: data
  })
}

// 修改学生部门
export function updateStudept(data) {
  return request({
    url: '/studept/studept',
    method: 'put',
    data: data
  })
}

// 删除学生部门
export function delStudept(deptId) {
  return request({
    url: '/studept/studept/' + deptId,
    method: 'delete'
  })
}
